package com.yxym.homework;

public class homework08 {
    public static void main(String[] args) {
//        Color []  colors = Color .values();
//        System.out.println("==============");
//        for(Color color : colors){
//            System.out.println(color);
//        }
//        System.out.println(Color.BLACK);
//        System.out.println(Color.RED);
//        System.out.println(Color.BLUE);
//        System.out.println(Color.GREEN);
//        System.out.println(Color.YELLOW);
        Color color1 = Color.RED;
        Color color2 = Color.BLACK;
        Color color3= Color.BLUE;
        Color color4= Color.YELLOW;
        Color color5= Color.GREEN;
        color1.show();
        color2.show();
        color3.show();
        color4.show();
        color5.show();

    }
}
enum Color implements AAA{
    RED(255,0,0),
    BLACK(0,0,255),
    BLUE(0,0,0),
    YELLOW(255,255,0),
    GREEN(0,255,0),
    ;
    private int redValue;
    private int greenValue;
    private int blueValue;

//    public int getRedValue() {
//        return redValue;
//    }
//
//    public int getGreenValue() {
//        return greenValue;
//    }
//
//    public int getBlueValue() {
//        return blueValue;
//    }

    Color(int redValue, int greenValue, int blueValue) {
        this.redValue = redValue;
        this.greenValue = greenValue;
        this.blueValue = blueValue;
    }

    @Override
    public void show() {
        System.out.println("RED:"+redValue+"\t"+greenValue+"\t"+blueValue);
//        System.out.println("BLACK:"+redValue+"\t"+greenValue+"\t"+blueValue);
//        System.out.println("BLUE:"+redValue+"\t"+greenValue+"\t"+blueValue);
//        System.out.println("YELLOW:"+redValue+"\t"+greenValue+"\t"+blueValue);
//        System.out.println("GREEN:"+redValue+"\t"+greenValue+"\t"+blueValue);
    }
}
interface AAA{
    public void show();
}